package com.huike.web.controller.clues;

import com.huike.clues.domain.TbClueTrackRecord;
import com.huike.clues.domain.vo.ClueTrackRecordVo;
import com.huike.clues.service.TbClueTrackRecordService;
import com.huike.common.core.controller.BaseController;
import com.huike.common.core.domain.AjaxResult;
import com.huike.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@RestController
@RequestMapping("/clues/record")
@Api(tags = "线索跟进记录管理相关接口")
public class TbClueTrackRecordController extends BaseController {
    @Resource
    private TbClueTrackRecordService tbClueTrackRecordService;

    /**
     * 查询线索跟进记录列表
     *
     * @param clueId
     * @return
     */
    @ApiOperation("查询线索跟进记录列表接口1")
    @GetMapping("/list")
    public TableDataInfo list(Integer clueId) {
        log.info("查询线索跟进记录列表接口:{}", clueId);
        List<TbClueTrackRecord> tbClueTrackRecord = tbClueTrackRecordService.selectByClueId(clueId);
        TableDataInfo tableDataInfo = new TableDataInfo();
        tableDataInfo.setRows(tbClueTrackRecord);
        tableDataInfo.setCode(200);
        tableDataInfo.setMsg("操作成功");
        return tableDataInfo;
    }

    /**
     * 新增线索跟进记录
     */
    /*@ApiOperation("新增线索跟进记录接口")
    @PostMapping
    public AjaxResult add(@RequestBody ClueTrackRecordVo tbClueTrackRecord) {
        log.info("新增线索跟进记录接口:{}", tbClueTrackRecord);

        return null();
    }*/


}
